home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / g / gnu_c / pmlsrc23.zoo / pmltests / makefile.pml < prev    next >
Encoding:
Makefile  |  1994-03-19  |  2.0 KB  |  95 lines

  1. #  USAGE
  2. #    make m=value s=true 
  3. #        where m=value is either
  4. #            m=m68881 or 881 
  5. #            to support systems with an 68020/68030+68881/68882
  6. #            (the 'TT-version' of the lib)
  7. #
  8. #            lib name: pml020.olb
  9. #        or
  10. #            m=sfp004
  11. #            to support 68000 based systems with a memory mapped
  12. #            68881
  13. #            such as the MEGA ST with Atari's sfp004 board
  14. #            or compatibles like Weide's board
  15. #            or (hopefully) the coprocessor of the MEGA STE
  16. #
  17. #            lib name: pmlsfp.olb
  18. #
  19. #        default (m omitted)
  20. #            make the pml for systems without coprocessor
  21. #
  22. #            lib name: pml.olb
  23. #
  24. #        s=true
  25. #            sets -D__MSHORT__
  26. #
  27. #            lib name: pml16.olb, pml02016.olb, pmlsfp16.olb
  28. #
  29. #        gdb=true
  30. #            compiles for gdb, also runs sym_ld
  31. #
  32. .SUFFIXES:
  33. .SUFFIXES: .c .o
  34.  
  35. # please define SLD to prepare for gdb and ld for verbose linking
  36. #
  37. #LD  = c:\gcc.140\exec\ld.ttp -M c:\gcc.140\lib\crt0.o
  38. SLD = c:\gcc.140\exec\sym_ld.ttp
  39.  
  40. CFLAGS :=    -DNO_DBUG -O -I../pmlsrc -DMJR
  41.  
  42. PML    := -lpml.olb
  43. GNU    := -lgnu.olb
  44.  
  45. ifneq (,$(findstring true,$(s)))
  46.  CFLAGS := $(CFLAGS) $(addprefix  ,-D__MSHORT__ -mshort)
  47.  PML := $(subst .olb,16.olb, $(PML))
  48.  GNU := $(subst .olb,16.olb, $(GNU))
  49. endif
  50.  
  51. ifneq (,$(findstring 881,$(m)))
  52.  CFLAGS := $(CFLAGS) $(addprefix  ,-m68020 -m68881 -D__M68881__)
  53.  PML := $(subst .olb,020.olb, $(PML))
  54.  GNU := $(subst .olb,020.olb, $(GNU))
  55. endif
  56.  
  57. ifneq (,$(findstring sfp004,$(m)))
  58.  CFLAGS := $(CFLAGS) $(addprefix  ,-Dsfp004)
  59.  PML := $(subst .olb,sfp.olb, $(PML))
  60.  GNU := $(subst .olb,sfp.olb, $(GNU))
  61. endif
  62.  
  63. LOADLIBES := $(PML) $(GNU)
  64. LDFLAGS = -s
  65.  
  66. ifneq (,$(findstring true,$(gdb)))
  67.  
  68. CFLAGS := $(CFLAGS) $(addprefix  ,-g)
  69. define link
  70.  $(LD) $< $(LDFLAGS) -o $@ $(LOADLIBES) 
  71.  $(SLD) $*.sym $(GNULIB)/crt0.o $(LOADLIBES) -o $@
  72. endef
  73.  
  74. else
  75.  
  76. define link
  77.  $(LD) $< $(LDFLAGS) -o $@ $(LOADLIBES) 
  78. endef
  79. endif
  80.  
  81. all :        d2d.ttp dd2d.ttp c2d.ttp c2c.ttp cc2c.ttp
  82.  
  83.  
  84. %.ttp : %.o
  85.     $(link)
  86. #    toglclr  $@
  87.  
  88. #$(SLD) $*.sym c:\gcc.140\lib\crt0.o $(LOADLIBES) -o $@
  89. #
  90. #    Clean up the directory.
  91. #
  92.  
  93. clean:
  94.     rm -f *.ttp *.BAK *.bak *.tmp nohup.out *.o
  95.